package top.broncho.lottery.ui.base

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.cancel
import org.jetbrains.anko.AnkoLogger

abstract class BaseViewModule(val app: Application) : AndroidViewModel(app), AnkoLogger,
    CoroutineScope by MainScope() {

    override fun onCleared() {
        super.onCleared()
        cancel()
    }

}